home *** CD-ROM | disk | FTP | other *** search
- -- Part of SmallEiffel -- Read DISCLAIMER file -- Copyright (C)
- -- Dominique COLNET and Suzanne COLLIN -- colnet@loria.fr
- --
- class TEST_GCD
-
- creation {ANY}
- make
-
- feature {ANY}
-
- make is
- do
- is_true((3).gcd(4) = 1);
- is_true((4).gcd(4) = 4);
- is_true((8).gcd(4) = 4);
- is_true((9).gcd(8) = 1);
- is_true((9).gcd(12) = 3);
- end;
-
- is_true(b: BOOLEAN) is
- do
- cpt := cpt + 1;
- if not b then
- std_output.put_string("TEST_GCD: ERROR Test # ");
- std_output.put_integer(cpt);
- std_output.put_string("%N");
- else
- -- std_output.put_string("Yes%N");
- end;
- end;
-
- cpt: INTEGER;
-
- end -- TEST_GCD
-